home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / IDA2_05.ZIP;1 / KERNEL.IDC < prev    next >
Encoding:
Text File  |  1994-03-17  |  1.4 KB  |  32 lines

  1. //
  2. //    This file can be considered as an example how to insert your own
  3. //    comments for the imported DLLs. Now this file inserts a comment for
  4. //    the kernel function #23 'LOCKSEGMENT'. You can add your own comments
  5. //    for other functions and DLLs. To execute this file your should
  6. //    choose 'Execute IDC file' command from the IDA menu. Usually the
  7. //    hotkey is F2.
  8. //
  9.  
  10. static main(void) {
  11.   auto kernel;
  12.  
  13.   Message("Loading comments...\n");
  14.   kernel = SegByName("KERNEL");        // get segment base
  15.   if ( kernel != -1 ) {            // if KERNEL exists
  16.     kernel = kernel << 4;        // convert to effective address
  17.  
  18.     ExtLinA(kernel+23,0,";--------------------------------------------------------");
  19.     ExtLinA(kernel+23,1,"; LockSegment (2.x)");
  20.     ExtLinA(kernel+23,2,"; ");
  21.     ExtLinA(kernel+23,3,"; In: AX - segment to lock");
  22.     ExtLinA(kernel+23,4,";     LockSegment function locks the specified discardable");
  23.     ExtLinA(kernel+23,5,"; segment. The segment is locked into memory at the given");
  24.     ExtLinA(kernel+23,6,"; address and its lock count is incremented (increased by one).");
  25.     ExtLinA(kernel+23,7,"; Returns");
  26.     ExtLinA(kernel+23,8,"; The return value specifies the data segment if the function is");
  27.     ExtLinA(kernel+23,9,"; successful. It is NULL if the segment has been discarded or an");
  28.     ExtLinA(kernel+23,10,"; error occurs.");
  29.   }
  30.   Message("Comment(s) are loaded.\n");
  31. }
  32.